FROM maven:3.8.7-eclipse-temurin-8 AS builder

ADD ./pom.xml pom.xml
ADD ./src src/

RUN mvn clean package

From eclipse-temurin:8-jre

COPY --from=builder target/cloudnative06-0.0.1-SNAPSHOT.jar /app/cloudnative06-0.0.1-SNAPSHOT.jar

ADD runboot.sh /app/

WORKDIR /app

RUN chmod a+x runboot.sh

CMD ["sh","-c","/app/runboot.sh"]

EXPOSE 9090